package net.melon.product.pojo;

import net.esj.basic.pojo.AbstractPojo;

public class ProductClassify  extends AbstractPojo<Long> {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -7390759531759351407L;
	
	public static final String ICON_SUB_DIR = "ml_product_classify_icon";
	
	public static enum CLASSIFY_STATE{
		
		SHOW(1),NOSHOW(0);
		
		private int state;

		private CLASSIFY_STATE(int state) {
			this.state = state;
		}

		public int getState() {
			return state;
		}
		
		public static CLASSIFY_STATE valueOf(int state){
			for(CLASSIFY_STATE st : values()){
				if(st.getState() == state){
					return st;
				}
			}
			return null;
		}
	}
	
	private Long id;
	private String name;
	private int state;
	private String icon;
	private int order;
	private int level;
	private ProductClassify parent;
	private ProductType type;
	
	public ProductClassify() {
		
	}

	public ProductClassify(Long id) {
		this.id = id;
	}
	
	public ProductClassify(long id, String name) {
		this.id = id;
		this.name = name;
	}

	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public ProductClassify getParent() {
		return parent;
	}
	public void setParent(ProductClassify parent) {
		this.parent = parent;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	public ProductType getType() {
		return type;
	}

	public void setType(ProductType type) {
		this.type = type;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}
	
}
